package Chapter04;
//找到所有的四维水仙花数
public class Test08 {
    public static void main(String[] args) {
        int ge=0,shi=0,bai=0,qian=0,sum=0;
        for(int i=1000;i<10000;i++){
            ge=i%10;
            shi=i/10%10;
            bai=i/100%10;
            qian=i/1000;
            sum=ge*ge*ge*ge+shi*shi*shi*shi+bai*bai*bai*bai+qian*qian*qian*qian;
            if(i==sum){
                System.out.println(i);
            }
        }
    }
}
